const mongoose = require('mongoose')

// 初始化表结构
const urlSchema = new mongoose.Schema({
    urlCode: String,
    longUrl: String,
    shortUrl: String,
    date: { type: String, default: Date.now() }
})

// 创建表模型
const modal = mongoose.model('Url', urlSchema)

module.exports = modal